GFile *selection_while_inactive;
GFile *current_folder_while_inactive;
- gulong combo_box_changed_id;
- gulong dialog_file_activated_id;
- gulong dialog_folder_changed_id;
- gulong dialog_selection_changed_id;
gulong fs_volumes_changed_id;
- gulong fs_bookmarks_changed_id;
GCancellable *dnd_select_folder_cancellable;
GCancellable *update_button_cancellable;
priv->icon_size = FALLBACK_ICON_SIZE;
priv->focus_on_click = TRUE;
- gtk_widget_push_composite_child ();
+ gtk_widget_init_template (GTK_WIDGET (button));
-
- /* Button */
- priv->button = gtk_button_new ();
- g_signal_connect (priv->button, "clicked",
- G_CALLBACK (button_clicked_cb), button);
- gtk_box_pack_start (GTK_BOX (button), priv->button, TRUE, TRUE, 0);
- gtk_widget_set_halign (priv->button, GTK_ALIGN_FILL);
- gtk_widget_show (priv->button);
-
- box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
- gtk_container_add (GTK_CONTAINER (priv->button), box);
- gtk_widget_show (box);
-
- priv->image = gtk_image_new ();
- gtk_box_pack_start (GTK_BOX (box), priv->image, FALSE, FALSE, 0);
- gtk_widget_show (priv->image);
-
- priv->label = gtk_label_new (_(FALLBACK_DISPLAY_NAME));
- gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END);
- gtk_widget_set_halign (priv->label, GTK_ALIGN_START);
- gtk_widget_set_valign (priv->label, GTK_ALIGN_CENTER);
- gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
- //gtk_container_add (GTK_CONTAINER (box), priv->label);
- gtk_widget_show (priv->label);
-
- sep = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
- gtk_box_pack_start (GTK_BOX (box), sep, FALSE, FALSE, 0);
- gtk_widget_show (sep);
-
- image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
- gtk_widget_show (image);
-
- /* Combo Box */
- /* Keep in sync with columns enum, line 88 */
- priv->model =
- GTK_TREE_MODEL (gtk_list_store_new (NUM_COLUMNS,
- GDK_TYPE_PIXBUF, /* Icon */
- G_TYPE_STRING, /* Display Name */
- G_TYPE_CHAR, /* Row Type */
- G_TYPE_POINTER /* Volume || Path */,
- G_TYPE_BOOLEAN /* Is Folder? */,
- G_TYPE_POINTER /* cancellable */));
-
- priv->combo_box = gtk_combo_box_new ();
- priv->combo_box_changed_id =
- g_signal_connect (priv->combo_box, "changed",
- G_CALLBACK (combo_box_changed_cb), button);
- gtk_box_pack_start (GTK_BOX (button), priv->combo_box, TRUE, TRUE, 0);
- gtk_widget_set_halign (priv->combo_box, GTK_ALIGN_FILL);
-
- priv->icon_cell = gtk_cell_renderer_pixbuf_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo_box),
- priv->icon_cell, FALSE);
- gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo_box),
- priv->icon_cell, "pixbuf", ICON_COLUMN);
-
- priv->name_cell = gtk_cell_renderer_text_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo_box),
- priv->name_cell, TRUE);
- gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo_box),
- priv->name_cell, "text", DISPLAY_NAME_COLUMN);
+ /* Bookmarks manager */
+ priv->bookmarks_manager = _gtk_bookmarks_manager_new (bookmarks_changed_cb, button);
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (priv->combo_box),
priv->name_cell, name_cell_data_func,
NULL, NULL);
priv->fs_volumes_changed_id =
g_signal_connect (priv->fs, "volumes-changed",
G_CALLBACK (fs_volumes_changed_cb), object);
- priv->fs_bookmarks_changed_id =
- g_signal_connect (priv->fs, "bookmarks-changed",
- G_CALLBACK (fs_bookmarks_changed_cb), object);
+ update_label_and_image (button);
+ update_combo_box (button);
+
return object;
}
--- /dev/null
- GType _shortcuts_pane_model_filter_get_type (void);
+/* gtkgladecatalog.c
+ *
+ * Copyright (C) 2013 Openismus GmbH
+ *
+ * Authors:
+ * Tristan Van Berkom <tristanvb@openismus.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtkpathbar.h"
+#include "gtkcolorswatchprivate.h"
+#include "gtkcolorplaneprivate.h"
+#include "gtkcolorscaleprivate.h"
+
+#ifdef G_OS_UNIX
+# include "gtkprinteroptionwidget.h"
+#endif
+
+/* Some forward declarations of internal types */
+GType _gtk_scale_button_scale_get_type (void);
- g_type_ensure (_shortcuts_pane_model_filter_get_type ());
+
+/* This function is referred to in gtk/glade/gtk-private-widgets.xml
+ * and is used to ensure the private types for use in Glade while
+ * editing UI files that define GTK+'s various composite widget classes.
+ */
+void
+gtk_glade_catalog_init (const gchar *catalog_name)
+{
+ g_type_ensure (GTK_TYPE_PATH_BAR);
+ g_type_ensure (GTK_TYPE_COLOR_SWATCH);
+ g_type_ensure (GTK_TYPE_COLOR_PLANE);
+ g_type_ensure (GTK_TYPE_COLOR_SCALE);
+ g_type_ensure (_gtk_scale_button_scale_get_type ());
+
+#ifdef G_OS_UNIX
+ g_type_ensure (GTK_TYPE_PRINTER_OPTION_WIDGET);
+#endif
+}